package com.ziq.nacosservice1;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/say")
public class SomethingToSay {

    @GetMapping("/hello")
    public String sayHello() {
        return "1 Server " + port + ": hello";
    }

    @GetMapping("/hi")
    public String sayHi() {
        return "1 Server " + port + ": hi";
    }

    @GetMapping("/ohh")
    public String sayOhh() {
        return "1 Server " + port + ": ohh";
    }
	
	@Value("${server.port}")
    private Integer port;
}
